<html>
<head><meta charset="utf-8"><title>Additional format derives? · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html">Additional format derives?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="227000074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227000074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227000074">(Feb 19 2021 at 17:42)</a>:</h4>
<p>Is there any reason the standard library can't have additional derives for the other non-Display formatters (eg: Binary, UpperHex, etc)?</p>
<p>Assuming all the fields of the whatever implement that formatter already, then it should work exactly like the Debug derive.</p>



<a name="227002127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227002127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227002127">(Feb 19 2021 at 17:56)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> Yes, for the same reason there's no <code>#[derive(Display)]</code> either. UpperHex is for <code>{:X}</code>, not for <code>{:X?}</code>. Deriving it only makes sense for the debug version.</p>



<a name="227002412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227002412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227002412">(Feb 19 2021 at 17:58)</a>:</h4>
<p>That doesn't actually explain at all why there can't be a derive for UpperHex.</p>



<a name="227002557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227002557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227002557">(Feb 19 2021 at 17:59)</a>:</h4>
<p>like, so is the logic "sometimes it might derive the wrong way to show the value"? then don't use the derive. sometimes ParialEq is also wrong when derived, but that doesn't means we don't still have a derive for it that usually does work.</p>



<a name="227002895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227002895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227002895">(Feb 19 2021 at 18:01)</a>:</h4>
<p>But what would the derive do? UpperHex is the equivalent of Display for hex, not the equivalent of Debug for hex. There's also no derive for Display, so I'm not sure what you're expecting here.</p>



<a name="227002956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227002956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227002956">(Feb 19 2021 at 18:01)</a>:</h4>
<p>Note that <code>{:X?}</code> (debug hex) already works with <code>#[derive(Debug)]</code></p>



<a name="227003339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227003339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227003339">(Feb 19 2021 at 18:04)</a>:</h4>
<p>i don't doubt you, but also had no idea, and don't even know how i would have known that based on the docs of the Formatter type</p>



<a name="227003402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227003402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227003402">(Feb 19 2021 at 18:04)</a>:</h4>
<p>because the Formatter doesn't appear to have a method to see if you're supposed to format a number as hex</p>



<a name="227004325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227004325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227004325">(Feb 19 2021 at 18:11)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/48584">https://github.com/rust-lang/rust/issues/48584</a> seems like the now closed tracking issue, see the last comment</p>



<a name="227004663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227004663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227004663">(Feb 19 2021 at 18:14)</a>:</h4>
<p>the last comment is a question from a year ago that no one ever replied to :3</p>



<a name="227004793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227004793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227004793">(Feb 19 2021 at 18:15)</a>:</h4>
<p>Yeah, so those should be made public.</p>



<a name="227004963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227004963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227004963">(Feb 19 2021 at 18:16)</a>:</h4>
<p>I mean I <em>also</em> think we should be able to derive all formatter styles too.</p>



<a name="227005837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227005837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227005837">(Feb 19 2021 at 18:23)</a>:</h4>
<p>Hm, so what would <code>#[derive(Display)]</code> do?</p>



<a name="227006102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227006102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227006102">(Feb 19 2021 at 18:25)</a>:</h4>
<p>It would do what Debug does, but if you don't think that's appropriate for showing to a user then you just don't derive, and you write it yourself.</p>



<a name="227006150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227006150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227006150">(Feb 19 2021 at 18:26)</a>:</h4>
<p>you don't <em>have</em> to use a derive just because it exists for some people to use.</p>



<a name="227006516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227006516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227006516">(Feb 19 2021 at 18:29)</a>:</h4>
<p>So it'd do what Debug does, but forward to Display for all members? That will give some weird results if you have fields that are a String or an Error or something, becuase those will be put in there unquoted, including newlines and whitespace and stuff.</p>



<a name="227006777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227006777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227006777">(Feb 19 2021 at 18:31)</a>:</h4>
<p>yes, and if it does the wrong thing for your type you would just not use the derive and write it yourself.</p>



<a name="227006801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227006801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227006801">(Feb 19 2021 at 18:31)</a>:</h4>
<p>which is no worse than currently</p>



<a name="227006834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227006834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227006834">(Feb 19 2021 at 18:31)</a>:</h4>
<p>but if it does do the right thing for you already, then you just saved yourself some time</p>



<a name="227007156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007156">(Feb 19 2021 at 18:33)</a>:</h4>
<p>i can't think of any situation where the debug-style derived output would be useful or correct for Display. do you have an example?</p>



<a name="227007158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007158">(Feb 19 2021 at 18:33)</a>:</h4>
<p>I think the idea is that this is almost never the right choice, so adding the option is more likely to encourage misuse than add convenience</p>



<a name="227007165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007165">(Feb 19 2021 at 18:33)</a>:</h4>
<p>I mean Debug is just "you show this to a rust dev" and Display is just "you show this to a non-rust dev", it's not like either of them are particularly suited to actual "end users" in the sense of non-programmers.</p>



<a name="227007298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007298">(Feb 19 2021 at 18:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224471">Lokathor</span> <a href="#narrow/stream/219381-t-libs/topic/Additional.20format.20derives.3F/near/227007165">said</a>:</p>
<blockquote>
<p>I mean Debug is just "you show this to a rust dev" and Display is just "you show this to a non-rust dev", it's not like either of them are particularly suited to actual "end users" in the sense of non-programmers.</p>
</blockquote>
<p>I don't necessarily agree with this characterization of <code>Display</code></p>



<a name="227007362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007362">(Feb 19 2021 at 18:35)</a>:</h4>
<p>depending on your application I think there are definitely cases where you'd want to show <code>Display</code> impls to end users</p>



<a name="227007393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007393">(Feb 19 2021 at 18:35)</a>:</h4>
<p>and that this is what it is intended for</p>



<a name="227007419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007419">(Feb 19 2021 at 18:35)</a>:</h4>
<blockquote>
<p>Display is just "you show this to a non-rust dev"</p>
</blockquote>
<p><code>Display</code> is for things that are displayed in an obvious/canonical way. E.g. an ipv4 address being displayed as 1.2.3.4, or a string displayed as just its contents.</p>



<a name="227007588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007588">(Feb 19 2021 at 18:36)</a>:</h4>
<p>This is e.g. why Vec&lt;u32&gt; doesn't implement Display, but does implement Debug.</p>



<a name="227007597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007597">(Feb 19 2021 at 18:36)</a>:</h4>
<p>Yes but "depending on your application" is already flying in the face of the fact that the type creator picked the Display impl for you</p>



<a name="227007631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007631">(Feb 19 2021 at 18:37)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224471">Lokathor</span> <a href="#narrow/stream/219381-t-libs/topic/Additional.20format.20derives.3F/near/227006102">said</a>:</p>
<blockquote>
<p>It would do what Debug does, but if you don't think that's appropriate for showing to a user then you just don't derive, and you write it yourself.</p>
</blockquote>
<p>I don't think this is appropriate -- I'd expect <code>derive(Display)</code> on a newtype to just forward to the inner <code>Display</code>, for example, not to call the inner things's <code>Debug</code>.</p>
<p>(Now, a crate providing <code>derive(DisplayAsDebug)</code> or whatever seems fine, but that doesn't need to be <code>core</code>.)</p>



<a name="227007683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007683">(Feb 19 2021 at 18:37)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224471">Lokathor</span> <a href="#narrow/stream/219381-t-libs/topic/Additional.20format.20derives.3F/near/227007597">said</a>:</p>
<blockquote>
<p>Yes but "depending on your application" is already flying in the face of the fact that the type creator picked the Display impl for you</p>
</blockquote>
<p>yea but that type creator is supposed to make the impl _for_ those applications that have end users viewing program values via the UI</p>



<a name="227007807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227007807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227007807">(Feb 19 2021 at 18:38)</a>:</h4>
<blockquote>
<p>Yes but "depending on your application" is already flying in the face of the fact that the type creator picked the Display impl for you</p>
</blockquote>
<p>that's why Display implementations should only exist if there is one obvious way. such as for strings. and also why they don't exist for things like Vec or Result.</p>



<a name="227008436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227008436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227008436">(Feb 19 2021 at 18:43)</a>:</h4>
<p>I don't care about that point and we'll clearly never see eye to eye about it</p>



<a name="227008462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227008462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227008462">(Feb 19 2021 at 18:43)</a>:</h4>
<p>can we just fix the Formatter type so that it gives you all thr right info?</p>



<a name="227008837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227008837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227008837">(Feb 19 2021 at 18:46)</a>:</h4>
<p>that rfc proposed an API for this: &lt;<a href="https://github.com/rust-lang/rfcs/blob/master/text/2226-fmt-debug-hex.md#formatter-api">https://github.com/rust-lang/rfcs/blob/master/text/2226-fmt-debug-hex.md#formatter-api</a>&gt;</p>
<p>but nobody has implemented it yet.</p>



<a name="227015983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227015983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227015983">(Feb 19 2021 at 19:32)</a>:</h4>
<p>So this RFC is approved and just waiting on an implementation? I will find someone if so.</p>



<a name="227021761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227021761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227021761">(Feb 19 2021 at 20:14)</a>:</h4>
<p>yes. but an implementation might be tricky, because .number_radix() should also return 16 in an UpperHex implementation for example. right now i can't think of a good place to do that that would still be efficient, but i haven't put much thought into it yet.</p>



<a name="227064393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227064393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227064393">(Feb 20 2021 at 04:14)</a>:</h4>
<p>Apparently someone already did the PR and then skipped the one part I care about: <a href="https://github.com/rust-lang/rust/pull/48978">https://github.com/rust-lang/rust/pull/48978</a></p>



<a name="227064418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Additional%20format%20derives%3F/near/227064418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Additional.20format.20derives.3F.html#227064418">(Feb 20 2021 at 04:14)</a>:</h4>
<p>they did have a justified reason to skip on it, but still a bad turn of luck for me</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>